<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>axiethernet: xaxiethernet_example_intr_fifo.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">axiethernet
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xaxiethernet__example__intr__fifo_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xaxiethernet_example_intr_fifo.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>Implements examples that utilize the Axi Ethernet's interrupt driven FIFO direct packet transfer mode to send and receive frames. </p>
<p>These examples demonstrate:</p>
<ul>
<li>How to perform simple send and receive.</li>
<li>Advanced frame processing</li>
<li>Error handling</li>
<li>Device reset</li>
</ul>
<p>Functional guide to example:</p>
<ul>
<li><a class="el" href="xaxiethernet__example__intr__fifo_8c.html#a91d22adccbd6db21ba46feb01f31c723" title="This function demonstrates the usage of the Axi Ethernet by sending and receiving a single frame in i...">AxiEthernetSingleFrameIntrExample()</a> demonstrates the simplest way to send and receive frames in interrupt driven FIFO direct mode.</li>
<li>AxiEthernetSingleFrameNonContIntrExample demonstrates how to handle frames that are stored in more than one memory location.</li>
<li>AxiEthernetMultipleFramesIntrExample demonstrates how to defer frame reception so that CPU intensive receive functions are not performed in interrupt context.</li>
<li>AxiEthernetErrorHandler() demonstrates how to manage asynchronous errors.</li>
<li><a class="el" href="xaxiethernet__example__polled_8c.html#a56e626d72ffba0a50d6c992df0f5eb6a" title="This function resets the device but preserves the options set by the user. ">AxiEthernetResetDevice()</a> demonstrates how to reset the driver/HW while maintaining driver/HW state.</li>
</ul>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date     Changes
</p>
<hr/>
<p>
1.00a asa  4/30/10  First release based on the ll temac driver
3.00a bss  10/22/12 Added support for Fast Interrupt Handlers.
3.01a srt  02/14/13 Added support for Zynq (CR 681136)
3.02a srt  08/06/13 Fixed CR 727634 -
                Modified FifoHandler() logic to reflect the bit
                changes in the Interrupt Status Register as per
                the latest AXI FIFO stream IP.
5.4   ms   01/23/17 Modified xil_printf statement in main function to
                    ensure that "Successfully ran" and "Failed" strings are
                    available in all examples. This is a fix for CR-965028.
      ms   04/05/17 Added return tags in functions for proper documentation
                    while generating doxygen.
5.6     adk  03/07/17 Fixed CR#979023 Example failed to compile.
5.12    sk   27/04/21 Fix multiple definition errors reported when peripheral
              tests are generated.
</pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:af8ae7cf7dd0a643f3ec50d40f8378667"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__example__intr__fifo_8c.html#af8ae7cf7dd0a643f3ec50d40f8378667">AxiEthernetFifoIntrExample</a> (INTC *IntcInstancePtr, <a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *AxiEthernetInstancePtr, XLlFifo *FifoInstancePtr, u16 AxiEthernetDeviceId, u16 FifoDeviceId, u16 AxiEthernetIntrId, u16 FifoIntrId)</td></tr>
<tr class="memdesc:af8ae7cf7dd0a643f3ec50d40f8378667"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function demonstrates the usage usage of the Axi Ethernet by sending and receiving frames in interrupt driven fifo mode.  <a href="#af8ae7cf7dd0a643f3ec50d40f8378667">More...</a><br/></td></tr>
<tr class="separator:af8ae7cf7dd0a643f3ec50d40f8378667"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91d22adccbd6db21ba46feb01f31c723"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__example__intr__fifo_8c.html#a91d22adccbd6db21ba46feb01f31c723">AxiEthernetSingleFrameIntrExample</a> (<a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *AxiEthernetInstancePtr, XLlFifo *FifoInstancePtr)</td></tr>
<tr class="memdesc:a91d22adccbd6db21ba46feb01f31c723"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function demonstrates the usage of the Axi Ethernet by sending and receiving a single frame in interrupt mode.  <a href="#a91d22adccbd6db21ba46feb01f31c723">More...</a><br/></td></tr>
<tr class="separator:a91d22adccbd6db21ba46feb01f31c723"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a034de95d97295ccf24089f22e85e94bb"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__example__intr__fifo_8c.html#a034de95d97295ccf24089f22e85e94bb">AxiEthernetSingleFrameNonContIntrExample</a> (<a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *AxiEthernetInstancePtr, XLlFifo *FifoInstancePtr)</td></tr>
<tr class="memdesc:a034de95d97295ccf24089f22e85e94bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">This example sends a packet from non-contiguous memory locations.  <a href="#a034de95d97295ccf24089f22e85e94bb">More...</a><br/></td></tr>
<tr class="separator:a034de95d97295ccf24089f22e85e94bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d1ee0d424789072776d5261d4babc09"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__example__intr__fifo_8c.html#a7d1ee0d424789072776d5261d4babc09">AxiEthernetMultipleFramesIntrExample</a> (<a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *AxiEthernetInstancePtr, XLlFifo *FifoInstancePtr)</td></tr>
<tr class="memdesc:a7d1ee0d424789072776d5261d4babc09"><td class="mdescLeft">&#160;</td><td class="mdescRight">This example sends and receives a batch of frames.  <a href="#a7d1ee0d424789072776d5261d4babc09">More...</a><br/></td></tr>
<tr class="separator:a7d1ee0d424789072776d5261d4babc09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__example__intr__fifo_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the main function for the Axi Ethernet example.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br/></td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="af8ae7cf7dd0a643f3ec50d40f8378667"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int AxiEthernetFifoIntrExample </td>
          <td>(</td>
          <td class="paramtype">INTC *&#160;</td>
          <td class="paramname"><em>IntcInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *&#160;</td>
          <td class="paramname"><em>AxiEthernetInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XLlFifo *&#160;</td>
          <td class="paramname"><em>FifoInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>AxiEthernetDeviceId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>FifoDeviceId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>AxiEthernetIntrId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>FifoIntrId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function demonstrates the usage usage of the Axi Ethernet by sending and receiving frames in interrupt driven fifo mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">IntcInstancePtr</td><td>is a pointer to the instance of the Intc component. </td></tr>
    <tr><td class="paramname">AxiEthernetInstancePtr</td><td>is a pointer to the instance of the Axi Ethernet component. </td></tr>
    <tr><td class="paramname">FifoInstancePtr</td><td>is a pointer to the instance of the AXIFIFO component. </td></tr>
    <tr><td class="paramname">AxiEthernetDeviceId</td><td>is Device ID of the Axi Ethernet Device , typically XPAR_&lt;AXIETHERNET_instance&gt;_DEVICE_ID value from xparameters.h. </td></tr>
    <tr><td class="paramname">FifoDeviceId</td><td>is the Interrupt ID and is typically XPAR_&lt;INTC_instance&gt;_&lt;AXIETHERNET_instance&gt;_VEC_ID value from xparameters.h. </td></tr>
    <tr><td class="paramname">AxiEthernetIntrId</td><td>is the Interrupt ID and is typically XPAR_&lt;INTC_instance&gt;_&lt;AXIETHERNET_instance&gt;_VEC_ID value from xparameters.h. </td></tr>
    <tr><td class="paramname">FifoIntrId</td><td>is the interrupt id for fifo.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS to indicate success.</li>
<li>XST_FAILURE.to indicate failure.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>AxiFifo hardware must be initialized before initializing AxiEthernet. Since AxiFifo reset line is connected to the AxiEthernet reset line, a reset of AxiFifo hardware during its initialization would reset AxiEthernet. </dd></dl>

<p>References <a class="el" href="struct_x_axi_ethernet___config.html#a34b00c1ae0534cb0e956feb2a834e820">XAxiEthernet_Config::AxiDevBaseAddress</a>, <a class="el" href="struct_x_axi_ethernet___config.html#a58df9c31ad87109bd294fb26a8af9630">XAxiEthernet_Config::AxiDevType</a>, <a class="el" href="xaxiethernet__example__intr__fifo_8c.html#a7d1ee0d424789072776d5261d4babc09">AxiEthernetMultipleFramesIntrExample()</a>, <a class="el" href="xaxiethernet__example__polled_8c.html#a56e626d72ffba0a50d6c992df0f5eb6a">AxiEthernetResetDevice()</a>, <a class="el" href="xaxiethernet__example__intr__fifo_8c.html#a91d22adccbd6db21ba46feb01f31c723">AxiEthernetSingleFrameIntrExample()</a>, <a class="el" href="xaxiethernet__example__intr__fifo_8c.html#a034de95d97295ccf24089f22e85e94bb">AxiEthernetSingleFrameNonContIntrExample()</a>, <a class="el" href="xaxiethernet__example_8h.html#ac864e2449120d62d81370b033fc89c42">AxiEthernetUtilEnterLoopback()</a>, <a class="el" href="xaxiethernet__example_8h.html#ad700d3b9e292277d5437ecc4dc304dc3">AxiEthernetUtilErrorTrap()</a>, <a class="el" href="xaxiethernet__example_8h.html#a0ab0dcd0f95007ddcc441c7cbc5f45dc">AxiEthernetUtilPhyDelay()</a>, <a class="el" href="struct_x_axi_ethernet___config.html#ae3fc04787ba28bb14e6c2add45c0c086">XAxiEthernet_Config::BaseAddress</a>, <a class="el" href="group__axiethernet.html#gabe257efe600df43d8148c772ea3878f9">XAxiEthernet_CfgInitialize()</a>, <a class="el" href="group__axiethernet.html#gadc2cf9ec186f1dffaece1552f96fcdd9">XAxiEthernet_GetPhysicalInterface</a>, <a class="el" href="group__axiethernet.html#ga781a4d89a7a3a9d59ac8921ba66b353d">XAxiEthernet_LookupConfig()</a>, <a class="el" href="group__axiethernet.html#gab2298b2b1af89cf0f0a78d4fda03ed7f">XAxiEthernet_SetMacAddress()</a>, <a class="el" href="group__axiethernet.html#gab2d0106f26a1a2e1f2b902dc0a2822c9">XAxiEthernet_SetOperatingSpeed()</a>, and <a class="el" href="group__axiethernet.html#ga4e952a55f342f176ba9ec2b49e2e47cb">XAxiEthernet_Stop()</a>.</p>

<p>Referenced by <a class="el" href="xaxiethernet__example__intr__fifo_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a7d1ee0d424789072776d5261d4babc09"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int AxiEthernetMultipleFramesIntrExample </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *&#160;</td>
          <td class="paramname"><em>AxiEthernetInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XLlFifo *&#160;</td>
          <td class="paramname"><em>FifoInstancePtr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This example sends and receives a batch of frames. </p>
<p>Frame reception is handled in this function and not in the callback function.</p>
<p>Use this method of reception when interrupt latency is important.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">AxiEthernetInstancePtr</td><td>is a pointer to the instance of the AxiEthernet component. </td></tr>
    <tr><td class="paramname">FifoInstancePtr</td><td>is a pointer to the instance of the Fifo component.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS to indicate success.</li>
<li>XST_FAILURE.to indicate failure.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xaxiethernet__example_8h.html#ad700d3b9e292277d5437ecc4dc304dc3">AxiEthernetUtilErrorTrap()</a>, <a class="el" href="xaxiethernet__example_8h.html#a1eb6d3a3d578519d065f1e674d00f144">AxiEthernetUtilFrameHdrFormatMAC()</a>, <a class="el" href="xaxiethernet__example_8h.html#aa8c4f8ca2870764a5708ae0458d2b96a">AxiEthernetUtilFrameHdrFormatType()</a>, <a class="el" href="xaxiethernet__example_8h.html#a69500ccf415291fc54dfc53333f98a07">AxiEthernetUtilFrameMemClear()</a>, <a class="el" href="xaxiethernet__example_8h.html#a5b2b391e4495ed818546c7ec695a724a">AxiEthernetUtilFrameSetPayloadData()</a>, <a class="el" href="xaxiethernet__example_8h.html#a561ef796435e1aa0b0eb5013bfb54cea">AxiEthernetUtilFrameVerify()</a>, <a class="el" href="group__axiethernet.html#ga2cfa48d42e55238f6f30aff6d658e4fe">XAxiEthernet_Start()</a>, and <a class="el" href="group__axiethernet.html#ga4e952a55f342f176ba9ec2b49e2e47cb">XAxiEthernet_Stop()</a>.</p>

<p>Referenced by <a class="el" href="xaxiethernet__example__intr__fifo_8c.html#af8ae7cf7dd0a643f3ec50d40f8378667">AxiEthernetFifoIntrExample()</a>.</p>

</div>
</div>
<a class="anchor" id="a91d22adccbd6db21ba46feb01f31c723"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int AxiEthernetSingleFrameIntrExample </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *&#160;</td>
          <td class="paramname"><em>AxiEthernetInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XLlFifo *&#160;</td>
          <td class="paramname"><em>FifoInstancePtr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function demonstrates the usage of the Axi Ethernet by sending and receiving a single frame in interrupt mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">AxiEthernetInstancePtr</td><td>is a pointer to the instance of the AxiEthernet component. </td></tr>
    <tr><td class="paramname">FifoInstancePtr</td><td>is a pointer to the instance of the Fifo component.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS to indicate success.</li>
<li>XST_FAILURE.to indicate failure.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xaxiethernet__example_8h.html#ad700d3b9e292277d5437ecc4dc304dc3">AxiEthernetUtilErrorTrap()</a>, <a class="el" href="xaxiethernet__example_8h.html#a1eb6d3a3d578519d065f1e674d00f144">AxiEthernetUtilFrameHdrFormatMAC()</a>, <a class="el" href="xaxiethernet__example_8h.html#aa8c4f8ca2870764a5708ae0458d2b96a">AxiEthernetUtilFrameHdrFormatType()</a>, <a class="el" href="xaxiethernet__example_8h.html#a69500ccf415291fc54dfc53333f98a07">AxiEthernetUtilFrameMemClear()</a>, <a class="el" href="xaxiethernet__example_8h.html#a5b2b391e4495ed818546c7ec695a724a">AxiEthernetUtilFrameSetPayloadData()</a>, <a class="el" href="group__axiethernet.html#gadf2299b3e254b7915b0b951ad3490f7e">XAE_INT_RXFIFOOVR_MASK</a>, <a class="el" href="group__axiethernet.html#gaa5ac7291090f44c1a2057589f2660b6c">XAE_INT_RXRJECT_MASK</a>, <a class="el" href="group__axiethernet.html#gab5476b0e04b0ecd8f9fd027f90ea648f">XAxiEthernet_IntEnable</a>, <a class="el" href="group__axiethernet.html#ga2cfa48d42e55238f6f30aff6d658e4fe">XAxiEthernet_Start()</a>, and <a class="el" href="group__axiethernet.html#ga4e952a55f342f176ba9ec2b49e2e47cb">XAxiEthernet_Stop()</a>.</p>

<p>Referenced by <a class="el" href="xaxiethernet__example__intr__fifo_8c.html#af8ae7cf7dd0a643f3ec50d40f8378667">AxiEthernetFifoIntrExample()</a>.</p>

</div>
</div>
<a class="anchor" id="a034de95d97295ccf24089f22e85e94bb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int AxiEthernetSingleFrameNonContIntrExample </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *&#160;</td>
          <td class="paramname"><em>AxiEthernetInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XLlFifo *&#160;</td>
          <td class="paramname"><em>FifoInstancePtr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This example sends a packet from non-contiguous memory locations. </p>
<p>The header is stored in one area. The payload data is calculated and written to the packet FIFO one byte at a time.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">AxiEthernetInstancePtr</td><td>is a pointer to the instance of the AxiEthernet component. </td></tr>
    <tr><td class="paramname">FifoInstancePtr</td><td>is a pointer to the instance of the Fifo component.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS to indicate success.</li>
<li>XST_FAILURE.to indicate failure.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xaxiethernet__example_8h.html#ad700d3b9e292277d5437ecc4dc304dc3">AxiEthernetUtilErrorTrap()</a>, <a class="el" href="xaxiethernet__example_8h.html#a1eb6d3a3d578519d065f1e674d00f144">AxiEthernetUtilFrameHdrFormatMAC()</a>, <a class="el" href="xaxiethernet__example_8h.html#aa8c4f8ca2870764a5708ae0458d2b96a">AxiEthernetUtilFrameHdrFormatType()</a>, <a class="el" href="xaxiethernet__example_8h.html#a69500ccf415291fc54dfc53333f98a07">AxiEthernetUtilFrameMemClear()</a>, <a class="el" href="group__axiethernet.html#ga2cfa48d42e55238f6f30aff6d658e4fe">XAxiEthernet_Start()</a>, and <a class="el" href="group__axiethernet.html#ga4e952a55f342f176ba9ec2b49e2e47cb">XAxiEthernet_Stop()</a>.</p>

<p>Referenced by <a class="el" href="xaxiethernet__example__intr__fifo_8c.html#af8ae7cf7dd0a643f3ec50d40f8378667">AxiEthernetFifoIntrExample()</a>.</p>

</div>
</div>
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is the main function for the Axi Ethernet example. </p>
<p>This function is not included if the example is generated from the TestAppGen test tool.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS to indicate success.</li>
<li>XST_FAILURE.to indicate failure. </li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xavb__example_8c.html#a249ec82daff032bfe981d21980bae55c">AXIETHERNET_DEVICE_ID</a>, <a class="el" href="xaxiethernet__example__intr__fifo_8c.html#af8ae7cf7dd0a643f3ec50d40f8378667">AxiEthernetFifoIntrExample()</a>, and <a class="el" href="xaxiethernet__example_8h.html#ad700d3b9e292277d5437ecc4dc304dc3">AxiEthernetUtilErrorTrap()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
